#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{
	int i = 0, num = 0, cnt = 0, max = 0;
	int n = 0, arr[1005] = { 0 };
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", &arr[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (arr[i + 1] - arr[i] == 0)
		{
			cnt++;
			if (cnt >= max)
			{
				max = cnt;
			}
			
		}
		else
		{
			cnt = 0;
		}
	}
	printf("%d", max+1);
	return 0;
}
